package wxd.mysqlitemanager.util.io;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class IOUtil {
	static Log log = LogFactory.getLog(IOUtil.class);
	
	public static void  closeStream(InputStream is){
		if(is != null){
			try {
				is.close();
				is = null;
			} catch (IOException e) {
				log.error(e);
			}			
		}
	}
	
	public static boolean isExist(String path){
		if(path != null && !"".equals(path.trim())){
			File file = new File(path);
			return file.exists();
		}
		return false;
	}
}
